﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using GalaSoft.MvvmLight;
using AgileLogistics.Model;
using GalaSoft.MvvmLight.CommandWpf;
using System.Windows.Controls;

namespace AgileLogistics.ViewModel
{
   public class NociteViewModel:ViewModelBase
    {
        
        public Model.Notice CurrNocite { get; set; }
        public Model.Users LoginUser { get; set; }
        public List<Notice> NociteList { get; set; }
        public List<Users> UserList { get; set; }
        public  Model.NoticeUsers NoticeUsers { get; set; }
        public List<NoticeUsers> NociteList1 { get; set; }
        public List<Model.NoticeUsers> HistoryNoticeUsersList { get; set; }

        #region 菜单切换


        private RelayCommand<string> menuChange => new Lazy<RelayCommand<string>>(() => new RelayCommand<string>(MenuChangeFunc)).Value;

        public RelayCommand<string> MenuChange
        {
            get
            {
                return menuChange;
            }
        }

        private void MenuChangeFunc(string menuHeader)
        {
            //HandyControl.Controls.Growl.SuccessGlobal(menuHeader);

            Page page = new Page();
            switch (menuHeader)
            {
                default:

                    break;
                case "新建通知":
                    // Growl.SuccessGlobal("新建页面");
                    page = new View.Nocite.Add();
                    break;
                case "历史通知":
                    // Growl.SuccessGlobal("查询页面");
                    page = new View.Nocite.Page_List();
                
                    break;

            }

            GalaSoft.MvvmLight.Messaging.Messenger.Default.Send<Page>(page, "NoticeNavigatePage");
        }



        #endregion
    }
}
